
/* Character.h
* obg
* 1-12-10
*/

#ifndef CHARACTER_H
#define CHARACTER_H

#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
#include "mygrafx.h"
#include "mytext.h"
#include <string>
#include <iostream>

using namespace std;


class Character
{
    protected:
        MyGrafx character_image;

        SDL_Rect sprite_info; // change the name this needs to hold height and width

        int health,
            damage;

        bool attacking,
             moving_right, // moving_right in Enemy class controls bullet direction and what way the enemy faces
             jumped,            // there is another moving_right_2 in Enemy.h its used for collisions
             landed,
             dead,
             on_block;

    public:
        Character();
        virtual ~Character();

        virtual void Draw( int x, int y);

        // this overloaded function is mostly for the enemy class. until I think of another
        // way to do this, this is the current solution.
        virtual void Draw( int bgX3, int y, int player_level_x, Character *player );
        virtual void Move_frame();

        bool Is_attacking();
        bool Is_moving_right();
        bool Is_jumping();
        bool Landed();

        bool Is_dead();

        void Set_landed( bool landed );
        void Set_attacking( bool attacking );
        void Set_moving_right( bool moving_right );
        void Set_jumping( bool jumped );

        int Get_health();
        int Get_damage();

        void Take_from_health( int amount );

        SDL_Rect Get_sprite_info();

        bool Is_on_block();
        void Set_on_block( bool on_top_block );

};
#endif
